//
//  UIButton+extension.swift
//  sxwb
//
//  Created by TianDu on 2016/11/11.
//  Copyright © 2016年 TianDu. All rights reserved.
//

import UIKit


extension UIButton {
    
    convenience init(image:String,bgImage:String) {
        
        self.init()
        
        setImage(UIImage(named:image), for: .normal)
        setImage(UIImage(named:image+"_highlighted"), for: .selected)
        setBackgroundImage(UIImage(named:bgImage), for: .normal)
        setBackgroundImage(UIImage(named:bgImage+"_highlighted"), for: .selected)
        sizeToFit()
    }
}
